﻿using YKXiangQi.Enums;

namespace YKXiangQi.ViewModels
{
    public class EnumMapperViewModel<T>: ViewModelBase
    {
        private EnumMapper<T> EnumMapper { get; set; }

        public EnumMapperViewModel(EnumMapper<T> enumMapper)
        {
            EnumMapper = enumMapper;
        }

        private bool _isChecked;
        public bool IsChecked
        {
            get { return _isChecked; }
            set
            {
                _isChecked = value;
                RaisePropertyChanged(() => this.IsChecked);
            }
        }

        public string Description
        {
            get { return EnumMapper.Description; }
        }

        public T Value
        {
            get { return EnumMapper.Value; }
        }
    }
}
